<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>免费部署 Alist 目录列表程序 | HMuSeaB の 小站</title><meta name="author" content="HMuSeaB"><meta name="copyright" content="HMuSeaB"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="[note type&#x3D;”primary flat no-icon”]写的比较仓促，有什么不足的地方，还请大家多多指点。评论区欢饮留言～[&#x2F;note] [note type&#x3D;”info flat no-icon”]  2022&#x2F;10&#x2F;30 新增下方的环境变量示例 感谢 @WeiCN 在评论区的错误指正 错误指正后，v3 版本也能正常部署使用了 202">
<meta property="og:type" content="article">
<meta property="og:title" content="免费部署 Alist 目录列表程序">
<meta property="og:url" content="https://hmuseab.github.io/2023/04/30/%E5%85%8D%E8%B4%B9%E9%83%A8%E7%BD%B2%20Alist%20%E7%9B%AE%E5%BD%95%E5%88%97%E8%A1%A8%E7%A8%8B%E5%BA%8F/index.html">
<meta property="og:site_name" content="HMuSeaB の 小站">
<meta property="og:description" content="[note type&#x3D;”primary flat no-icon”]写的比较仓促，有什么不足的地方，还请大家多多指点。评论区欢饮留言～[&#x2F;note] [note type&#x3D;”info flat no-icon”]  2022&#x2F;10&#x2F;30 新增下方的环境变量示例 感谢 @WeiCN 在评论区的错误指正 错误指正后，v3 版本也能正常部署使用了 202">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg">
<meta property="article:published_time" content="2023-04-30T06:45:00.000Z">
<meta property="article:modified_time" content="2024-05-18T12:24:55.093Z">
<meta property="article:author" content="HMuSeaB">
<meta property="article:tag" content="知识">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://hmuseab.github.io/2023/04/30/%E5%85%8D%E8%B4%B9%E9%83%A8%E7%BD%B2%20Alist%20%E7%9B%AE%E5%BD%95%E5%88%97%E8%A1%A8%E7%A8%8B%E5%BA%8F/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css?v=4.13.0"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.1/css/all.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0.33/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
  root: '/',
  algolia: undefined,
  localSearch: {"path":"/search.xml","preload":false,"top_n_per_article":1,"unescape":false,"languages":{"hits_empty":"找不到您查询的内容：${query}","hits_stats":"共找到 ${hits} 篇文章"}},
  translate: undefined,
  noticeOutdate: {"limitDay":500,"position":"top","messagePrev":"It has been","messageNext":"days since the last update, the content of the article may be outdated."},
  highlight: {"plugin":"highlight.js","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  infinitegrid: {
    js: 'https://cdn.jsdelivr.net/npm/@egjs/infinitegrid@4.11.1/dist/infinitegrid.min.js',
    buttonText: '加载更多'
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '免费部署 Alist 目录列表程序',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2024-05-18 20:24:55'
}</script><script>(win=>{
      win.saveToLocal = {
        set: (key, value, ttl) => {
          if (ttl === 0) return
          const now = Date.now()
          const expiry = now + ttl * 86400000
          const item = {
            value,
            expiry
          }
          localStorage.setItem(key, JSON.stringify(item))
        },
      
        get: key => {
          const itemStr = localStorage.getItem(key)
      
          if (!itemStr) {
            return undefined
          }
          const item = JSON.parse(itemStr)
          const now = Date.now()
      
          if (now > item.expiry) {
            localStorage.removeItem(key)
            return undefined
          }
          return item.value
        }
      }
    
      win.getScript = (url, attr = {}) => new Promise((resolve, reject) => {
        const script = document.createElement('script')
        script.src = url
        script.async = true
        script.onerror = reject
        script.onload = script.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          script.onload = script.onreadystatechange = null
          resolve()
        }

        Object.keys(attr).forEach(key => {
          script.setAttribute(key, attr[key])
        })

        document.head.appendChild(script)
      })
    
      win.getCSS = (url, id = false) => new Promise((resolve, reject) => {
        const link = document.createElement('link')
        link.rel = 'stylesheet'
        link.href = url
        if (id) link.id = id
        link.onerror = reject
        link.onload = link.onreadystatechange = function() {
          const loadState = this.readyState
          if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
          link.onload = link.onreadystatechange = null
          resolve()
        }
        document.head.appendChild(link)
      })
    
      win.activateDarkMode = () => {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = () => {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
        if (t === 'dark') activateDarkMode()
        else if (t === 'light') activateLightMode()
      
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
      const detectApple = () => {
        if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
          document.documentElement.classList.add('apple')
        }
      }
      detectApple()
    })(window)</script><link rel="stylesheet" href="/css/style.css"><meta name="generator" content="Hexo 7.2.0"></head><body><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://i0.hippopx.com/photos/121/457/241/girls-the-scenery-wallpaper-7f97112750013868bc5bcc249f13e27d.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">14</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">6</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> Tags</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> List</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg')"><nav id="nav"><span id="blog-info"><a href="/" title="HMuSeaB の 小站"><span class="site-name">HMuSeaB の 小站</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> Tags</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> List</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> Music</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> Movie</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">免费部署 Alist 目录列表程序</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2023-04-30T06:45:00.000Z" title="发表于 2023-04-30 14:45:00">2023-04-30</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2024-05-18T12:24:55.093Z" title="更新于 2024-05-18 20:24:55">2024-05-18</time></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">字数总计:</span><span class="word-count">957</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>3分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="免费部署 Alist 目录列表程序"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><p>[note type&#x3D;”primary flat no-icon”]写的比较仓促，有什么不足的地方，还请大家多多指点。评论区欢饮留言～[&#x2F;note]</p>
<p>[note type&#x3D;”info flat no-icon”]</p>
<ol>
<li>2022&#x2F;10&#x2F;30 新增下方的环境变量示例</li>
<li>感谢 <a target="_blank" rel="noopener" href="https://cuojue.org/">@WeiCN</a> 在评论区的错误指正</li>
<li>错误指正后，v3 版本也能正常部署使用了</li>
<li>2023&#x2F;3&#x2F;16 恢复图片链接，原深海图床 CDN 因未知原因无法访问，已把仅剩的缩略图迁移至去不图床，图片可能会比较模糊[&#x2F;note]</li>
</ol>
<h1 id="简介"><a href="#简介" class="headerlink" title="简介"></a>简介</h1><p>Alist 是一款支持多种存储的目录文件列表程序，后端基于 <code>gin</code>，前端使用 <code>react</code></p>
<p><a target="_blank" rel="noopener" href="https://bu.dusays.com/2023/03/16/6413013a46fe1.png"><img src="https://bu.dusays.com/2023/03/16/6413013a46fe1.png" alt="img"></a></p>
<p><a target="_blank" rel="noopener" href="https://bu.dusays.com/2023/03/16/6413010ad3013.png"><img src="https://bu.dusays.com/2023/03/16/6413010ad3013.png" alt="img"></a></p>
<p><a target="_blank" rel="noopener" href="https://alist-doc.nn.ci/">查看文档</a><a target="_blank" rel="noopener" href="https://github.com/Xhofe/alist">查看源码</a></p>
<hr>
<h1 id="部署前准备"><a href="#部署前准备" class="headerlink" title="部署前准备"></a>部署前准备</h1><ol>
<li>一个 Github 账号</li>
<li>Fork 一份 <a target="_blank" rel="noopener" href="https://github.com/alist-org/alist-render">Alist-render</a> 的仓库</li>
<li>一个 render 账号</li>
<li>一个数据库，可选 <code>sqlite3</code>、<code>mysql</code>、<code>postgres</code></li>
</ol>
<hr>
<h2 id="render-账号"><a href="#render-账号" class="headerlink" title="render 账号"></a>render 账号</h2><p>点击进入 <a target="_blank" rel="noopener" href="https://render.com/">render</a> 官网<br>点击右上角 <code>GET STARTED</code>, 使用 Github 进行注册或登录<br>按照网页的提示完成注册后进入控制面板</p>
<p><a target="_blank" rel="noopener" href="https://bu.dusays.com/2023/03/16/641301642afa0.png"><img src="https://bu.dusays.com/2023/03/16/641301642afa0.png" alt="img"></a></p>
<p><a target="_blank" rel="noopener" href="https://bu.dusays.com/2023/03/16/64130188a77c9.png"><img src="https://bu.dusays.com/2023/03/16/64130188a77c9.png" alt="img"></a></p>
<h2 id="数据库"><a href="#数据库" class="headerlink" title="数据库"></a>数据库</h2><p>点击进入 <a target="_blank" rel="noopener" href="https://www.elephantsql.com/">elephantsql</a> 官网<br>点击位于页面中央的 <code>Get a managed database today</code>，选择海龟样子的 <code>Free</code> 计划<br>会进入登陆页面，可以使用 Github 进行授权登陆，然后信息随便填一下就行<br>进入控制面板后创建数据库，计划记得选择 <code>Free</code><br>这样我们就获得了一个免费的 <code>postgres</code> 类型的数据库</p>
<p><a target="_blank" rel="noopener" href="https://bu.dusays.com/2023/03/16/641301d4e12ac.png"><img src="https://bu.dusays.com/2023/03/16/641301d4e12ac.png" alt="img"></a></p>
<p><a target="_blank" rel="noopener" href="https://bu.dusays.com/2023/03/16/641301efa6837.png"><img src="https://bu.dusays.com/2023/03/16/641301efa6837.png" alt="img"></a></p>
<p><a target="_blank" rel="noopener" href="https://bu.dusays.com/2023/03/16/641302067ba2a.png"><img src="https://bu.dusays.com/2023/03/16/641302067ba2a.png" alt="img"></a></p>
<p><a target="_blank" rel="noopener" href="https://bu.dusays.com/2023/03/16/64130228cfac7.png"><img src="https://bu.dusays.com/2023/03/16/64130228cfac7.png" alt="img"></a></p>
<p>数据库的信息最好记下来备用，等一会要填</p>
<p>截图中的数据库在文章发布后已被删除</p>
<hr>
<h1 id="部署-Alist"><a href="#部署-Alist" class="headerlink" title="部署 Alist"></a>部署 Alist</h1><h2 id="拉取仓库"><a href="#拉取仓库" class="headerlink" title="拉取仓库"></a>拉取仓库</h2><p>进入 <a target="_blank" rel="noopener" href="https://dashboard.render.com/">render</a> 的控制台，点击 <code>New+</code>，选择 <code>Web Service</code></p>
<p><a target="_blank" rel="noopener" href="https://bu.dusays.com/2023/03/16/64130252835b9.png"><img src="https://bu.dusays.com/2023/03/16/64130252835b9.png" alt="img"></a></p>
<p><a target="_blank" rel="noopener" href="https://bu.dusays.com/2023/03/16/64130276670f6.png"><img src="https://bu.dusays.com/2023/03/16/64130276670f6.png" alt="img"></a></p>
<p>选择刚刚 Fork 的 <a target="_blank" rel="noopener" href="https://github.com/alist-org/alist-render">Alist-render</a> 的仓库<br>点击，进入部署页面，自己取个名字，然后先什么都不要动，往下拉，拉到最底下</p>
<h2 id="设置环境变量"><a href="#设置环境变量" class="headerlink" title="设置环境变量"></a>设置环境变量</h2><p>在左下角 <code>Create Web Service</code> 的按钮上边，有个 <code>Advanced</code> 按钮，点击<br>然后在点击 <code>Add Environment Variable</code> 开始添加环境变量<br>这边可以参考我之前在 Alist 社区的对话</p>
<p>[<a target="_blank" rel="noopener" href="https://www.zxma.top/posts/438365eb/#referto_[1]">1]</a><a target="_blank" rel="noopener" href="https://github.com/alist-org/alist/discussions/931">koyeb 怎么连接数据库</a></p>
<p><a target="_blank" rel="noopener" href="https://bu.dusays.com/2023/03/16/6413029066de4.png"><img src="https://bu.dusays.com/2023/03/16/6413029066de4.png" alt="img"></a></p>
<p>参考表格对应填写变量参数，只要把 <code>DB_HOST</code>，<code>DB_NAME</code>，<code>DB_PASS</code>，<code>DB_USER</code> 给改成自己的就可以了</p>
<table>
<thead>
<tr>
<th align="center">数据库对应</th>
<th align="center">变量参数</th>
<th align="center">示例参数</th>
</tr>
</thead>
<tbody><tr>
<td align="center">Server</td>
<td align="center">DB_HOST</td>
<td align="center">queenie.db.elephantsql.com</td>
</tr>
<tr>
<td align="center">User &amp; Default database</td>
<td align="center">DB_NAME</td>
<td align="center">bkqgx</td>
</tr>
<tr>
<td align="center">Password</td>
<td align="center">DB_PASS</td>
<td align="center">5CqBjEVZWdaaad2333aadadadadN3Clo</td>
</tr>
<tr>
<td align="center"></td>
<td align="center">DB_PORT</td>
<td align="center">5432</td>
</tr>
<tr>
<td align="center"></td>
<td align="center">DB_SSL_MODE</td>
<td align="center">disable</td>
</tr>
<tr>
<td align="center"></td>
<td align="center">DB_TYPE</td>
<td align="center">postgres</td>
</tr>
<tr>
<td align="center">User &amp; Default database</td>
<td align="center">DB_USER</td>
<td align="center">bkqgx</td>
</tr>
<tr>
<td align="center"></td>
<td align="center">PORT</td>
<td align="center">8080</td>
</tr>
</tbody></table>
<p>填完检查一下，一共 8 个变量，好了就可以点击 <code>Create Web Service</code> 开始部署了，大概 1~2 分钟可以看到成果</p>
<ol>
<li>2022&#x2F;10&#x2F;30 新增下方的环境变量示例，供大家参考↓↓↓</li>
<li>感谢 <a target="_blank" rel="noopener" href="https://cuojue.org/">@WeiCN</a> 在评论区的错误指正</li>
<li>错误指正后，v3 版本也能正常部署使用了</li>
</ol>
<h2 id="环境变量示例"><a href="#环境变量示例" class="headerlink" title="环境变量示例"></a>环境变量示例</h2><ul>
<li>参数示例</li>
<li>文字示例</li>
<li>关于 sslmode</li>
</ul>
<p>DB_SSL_MODE 这个变量我也不是很清楚，有错误的可以评论区指正，根据官方文档来看</p>
<ol>
<li>sqlite3 数据库：请忽略该参数</li>
<li>mysql 数据库：参数有 <code>true</code>, <code>false</code>, <code>skip-verify</code>, <code>preferred</code>, 选一个填</li>
<li>postgres 数据库：参数有 <code>disable</code>，<code>allow</code>，<code>prefer</code>，<code>require</code>，<code>verify-full</code>，选一个填</li>
</ol>
<p>我用的 postgres 数据库填的是 <code>disable</code>，就是没用 SSL</p>
<h1 id="评论区疑难解答"><a href="#评论区疑难解答" class="headerlink" title="评论区疑难解答"></a>评论区疑难解答</h1><ul>
<li>账密未输出</li>
<li>保持唤醒</li>
</ul>
<p>如果你是已连接数据库了，那么你的密码应该已经写入数据库了，所以他不会再显示了，需要你自己去数据库看用户名和密码<br>如果你使用的是 <a target="_blank" rel="noopener" href="https://www.elephantsql.com/">elephantsql</a> 数据库<br>前往你自己的 <a target="_blank" rel="noopener" href="https://www.elephantsql.com/">elephantsql</a> 数据库，点击侧边栏的 <code>Browser</code> 之后输入 <code>SELECT * FROM &quot;public&quot;.&quot;x_users&quot; LIMIT 100</code><br>会有一行 <code>username</code> 名为 <code>admin</code> 的，后面就是密码，<code>admin</code> 就是用户名<br><a target="_blank" rel="noopener" href="https://bu.dusays.com/2022/12/05/638dcf8bb852a.png"><img src="https://bu.dusays.com/2022/12/05/638dcf8bb852a.png" alt="1670238084349-87e699bc8702c63c9c8182ab8b1e1440.png"></a></p>
<p>或者点 <code>Table queries</code>，再点 <code>x_user</code> 也是可以的<br><a target="_blank" rel="noopener" href="https://bu.dusays.com/2022/12/05/638dcfaa95816.png"><img src="https://bu.dusays.com/2022/12/05/638dcfaa95816.png" alt="1670238119405-87e699bc8702c63c9c8182ab8b1e1440.png"></a></p>
<hr>
<h1 id="示例站点"><a href="#示例站点" class="headerlink" title="示例站点"></a>示例站点</h1><p>免费部署 Alist 目录列表程序</p>
<p><a target="_blank" rel="noopener" href="https://www.zxma.top/posts/438365eb/">https://www.zxma.top/posts/438365eb/</a></p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta"><i class="fas fa-circle-user fa-fw"></i>文章作者: </span><span class="post-copyright-info"><a href="https://hmuseab.github.io">HMuSeaB</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta"><i class="fas fa-square-arrow-up-right fa-fw"></i>文章链接: </span><span class="post-copyright-info"><a href="https://hmuseab.github.io/2023/04/30/%E5%85%8D%E8%B4%B9%E9%83%A8%E7%BD%B2%20Alist%20%E7%9B%AE%E5%BD%95%E5%88%97%E8%A1%A8%E7%A8%8B%E5%BA%8F/">https://hmuseab.github.io/2023/04/30/%E5%85%8D%E8%B4%B9%E9%83%A8%E7%BD%B2%20Alist%20%E7%9B%AE%E5%BD%95%E5%88%97%E8%A1%A8%E7%A8%8B%E5%BA%8F/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta"><i class="fas fa-circle-exclamation fa-fw"></i>版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://hmuseab.github.io" target="_blank">HMuSeaB の 小站</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E7%9F%A5%E8%AF%86/">知识</a></div><div class="post_share"><div class="social-share" data-image="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1.1.3/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1.1.3/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2023/04/30/NotionNext-%E5%BF%AB%E9%80%9F%E5%85%8D%E8%B4%B9%E6%90%AD%E5%BB%BA%E7%BD%91%E7%AB%99/" title="NotionNext-快速免费搭建网站"><img class="cover" src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">NotionNext-快速免费搭建网站</div></div></a></div><div class="next-post pull-right"><a href="/2023/04/29/clash/" title="Clash"><img class="cover" src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">Clash</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><div><a href="/2023/04/15/API/" title="API基本概念"><img class="cover" src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-04-15</div><div class="title">API基本概念</div></div></a></div><div><a href="/2023/04/29/clash/" title="Clash"><img class="cover" src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2023-04-29</div><div class="title">Clash</div></div></a></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://i0.hippopx.com/photos/121/457/241/girls-the-scenery-wallpaper-7f97112750013868bc5bcc249f13e27d.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">HMuSeaB</div><div class="author-info__description">MuSea的blog，欢迎访问</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">14</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">6</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/xxxxxx"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/HMuSeaB" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:huangsibo948@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">This is my Blog</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E7%AE%80%E4%BB%8B"><span class="toc-number">1.</span> <span class="toc-text">简介</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E9%83%A8%E7%BD%B2%E5%89%8D%E5%87%86%E5%A4%87"><span class="toc-number">2.</span> <span class="toc-text">部署前准备</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#render-%E8%B4%A6%E5%8F%B7"><span class="toc-number">2.1.</span> <span class="toc-text">render 账号</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%95%B0%E6%8D%AE%E5%BA%93"><span class="toc-number">2.2.</span> <span class="toc-text">数据库</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E9%83%A8%E7%BD%B2-Alist"><span class="toc-number">3.</span> <span class="toc-text">部署 Alist</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%8B%89%E5%8F%96%E4%BB%93%E5%BA%93"><span class="toc-number">3.1.</span> <span class="toc-text">拉取仓库</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E8%AE%BE%E7%BD%AE%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F"><span class="toc-number">3.2.</span> <span class="toc-text">设置环境变量</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E7%A4%BA%E4%BE%8B"><span class="toc-number">3.3.</span> <span class="toc-text">环境变量示例</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E8%AF%84%E8%AE%BA%E5%8C%BA%E7%96%91%E9%9A%BE%E8%A7%A3%E7%AD%94"><span class="toc-number">4.</span> <span class="toc-text">评论区疑难解答</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E7%A4%BA%E4%BE%8B%E7%AB%99%E7%82%B9"><span class="toc-number">5.</span> <span class="toc-text">示例站点</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2024/05/18/%E5%93%94%E5%93%A9%E5%93%94%E5%93%A9%E5%8D%A1%E7%89%87%E6%A0%87%E7%AD%BE%E5%A4%96%E6%8C%82/" title="哔哩哔哩卡片标签外挂"><img src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="哔哩哔哩卡片标签外挂"/></a><div class="content"><a class="title" href="/2024/05/18/%E5%93%94%E5%93%A9%E5%93%94%E5%93%A9%E5%8D%A1%E7%89%87%E6%A0%87%E7%AD%BE%E5%A4%96%E6%8C%82/" title="哔哩哔哩卡片标签外挂">哔哩哔哩卡片标签外挂</a><time datetime="2024-05-18T13:53:45.000Z" title="发表于 2024-05-18 21:53:45">2024-05-18</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2024/04/26/Vim%E7%AE%80%E4%BB%8B/" title="Vim简介"><img src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Vim简介"/></a><div class="content"><a class="title" href="/2024/04/26/Vim%E7%AE%80%E4%BB%8B/" title="Vim简介">Vim简介</a><time datetime="2024-04-26T09:11:41.000Z" title="发表于 2024-04-26 17:11:41">2024-04-26</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/04/30/%E2%80%9C%E9%95%BF%E5%A4%A7%E5%90%8E%E6%89%8D%E5%8F%91%E7%8E%B0%EF%BC%8C%E8%AF%AD%E6%96%87%E8%AF%BE%E6%9C%AC%E9%87%8C%E9%9D%A2%E5%85%A8%E6%98%AF%E5%88%80%EF%BC%81%EF%BC%81%EF%BC%81%E2%80%9D/" title="“长大后才发现，语文课本里面全是刀！！！”"><img src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="“长大后才发现，语文课本里面全是刀！！！”"/></a><div class="content"><a class="title" href="/2023/04/30/%E2%80%9C%E9%95%BF%E5%A4%A7%E5%90%8E%E6%89%8D%E5%8F%91%E7%8E%B0%EF%BC%8C%E8%AF%AD%E6%96%87%E8%AF%BE%E6%9C%AC%E9%87%8C%E9%9D%A2%E5%85%A8%E6%98%AF%E5%88%80%EF%BC%81%EF%BC%81%EF%BC%81%E2%80%9D/" title="“长大后才发现，语文课本里面全是刀！！！”">“长大后才发现，语文课本里面全是刀！！！”</a><time datetime="2023-04-30T08:44:00.000Z" title="发表于 2023-04-30 16:44:00">2023-04-30</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/04/30/%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" title="Replit博客【已失效，留帖以纪念】"><img src="https://i.loli.net/2020/05/01/gkihqEjXxJ5UZ1C.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Replit博客【已失效，留帖以纪念】"/></a><div class="content"><a class="title" href="/2023/04/30/%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" title="Replit博客【已失效，留帖以纪念】">Replit博客【已失效，留帖以纪念】</a><time datetime="2023-04-30T08:44:00.000Z" title="发表于 2023-04-30 16:44:00">2023-04-30</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/04/30/%E2%80%9C%E7%8E%AB%E7%91%B0%E5%A4%AA%E8%B4%B5%E4%BA%86%EF%BC%8C%E2%BD%A4%E9%87%8E%E8%8D%89%E7%BA%AA%E5%BF%B5%E6%88%91%E5%90%A7%EF%BC%8C%E6%BB%A1%E5%9C%B0%E9%83%BD%E6%98%AF%EF%BC%8C%E7%94%9F%E7%94%9F%E4%B8%8D%E6%81%AF%E2%80%9D/" title="“玫瑰太贵了，⽤野草纪念我吧，满地都是，生生不息”"><img src="https://jsd.012700.xyz/gh/jerryc127/CDN@latest/cover/default_bg.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="“玫瑰太贵了，⽤野草纪念我吧，满地都是，生生不息”"/></a><div class="content"><a class="title" href="/2023/04/30/%E2%80%9C%E7%8E%AB%E7%91%B0%E5%A4%AA%E8%B4%B5%E4%BA%86%EF%BC%8C%E2%BD%A4%E9%87%8E%E8%8D%89%E7%BA%AA%E5%BF%B5%E6%88%91%E5%90%A7%EF%BC%8C%E6%BB%A1%E5%9C%B0%E9%83%BD%E6%98%AF%EF%BC%8C%E7%94%9F%E7%94%9F%E4%B8%8D%E6%81%AF%E2%80%9D/" title="“玫瑰太贵了，⽤野草纪念我吧，满地都是，生生不息”">“玫瑰太贵了，⽤野草纪念我吧，满地都是，生生不息”</a><time datetime="2023-04-30T08:30:00.000Z" title="发表于 2023-04-30 16:30:00">2023-04-30</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2024 By HMuSeaB</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text"><div><a>很高兴认识你!</div></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js?v=4.13.0"></script><script src="/js/main.js?v=4.13.0"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0.33/dist/fancybox/fancybox.umd.min.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page@5.2.0/instantpage.min.js" type="module"></script><script>function panguFn () {
  if (typeof pangu === 'object') pangu.autoSpacingPage()
  else {
    getScript('https://cdn.jsdelivr.net/npm/pangu@4.0.7/dist/browser/pangu.min.js')
      .then(() => {
        pangu.autoSpacingPage()
      })
  }
}

function panguInit () {
  if (false){
    GLOBAL_CONFIG_SITE.isPost && panguFn()
  } else {
    panguFn()
  }
}

document.addEventListener('DOMContentLoaded', panguInit)</script><div class="js-pjax"></div><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/js/search/local-search.js?v=4.13.0"></script></div></div></body></html>